home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ ATI128 3.xpl < prev    next >
Text File  |  1999-09-10  |  4KB  |  134 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="3"
  4. "UIPATH"="Hardware\Video Cards\ATI 128"
  5. "NAME"="OpenGL Settings"
  6. "VERSION"="1.01"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Enable converting 32bit textures to 16bit"
  9. "TEXT 2"="Enable dithering if Alpha Blending is activated"
  10. "TEXT 3"="Enable MultiTexuring (better quality display)"
  11. "DESCRIPTION 1"="Some options for your ATI128 card."
  12. "AUTHOR"="Xteq Systems"
  13. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  14. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  15. "COMMENT 2"="Thanks to CptSiskoX for the settings and the idea."
  16.  
  17.  
  18. '-- ONLY CHANGE THE LINES WITHOUT ' at the beginning !!
  19. '
  20. '*** Xteq Systems "On/Off" Plug-in Template ***
  21. '*** ID_XQ_PT1 V1.00 
  22.  
  23.  ' how many settings are in this file (change "COUNT=" also!) 
  24.  CountSettings=3
  25.  
  26.  ' does this plug-in requires the user to logoff or to restart his PC?
  27.  bRequireLogoff=0
  28.  bRequireRestart=1
  29.  
  30.  ' if this path exists in the registry, the plug-in will be enabled. if it does
  31.  ' not exist, the plug-in will be disable set to ="" to ignore this check and alway
  32.  ' enable the plug-in, regardless if the path exists or not
  33.  sCheckPath="HKLM\Software\ATI Technologies\Driver\OpenGL\"
  34.  
  35.  
  36.  ' Settings for Value # 1
  37.  sV1_Path="HKLM\Software\ATI Technologies\Driver\OpenGL\OGLConvertTextures32To16"
  38.  sV1_OnValue="1"      'what is the "ON" value (e.g. "1", "True", "On" etc.)
  39.  sV1_OffValue="0"      'what is the "OFF" value (e.g. "0", "False", "Off" etc.)
  40.  sV1_DataType="2"     'datatype of this value (REG_STRING=1, REG_DWORD=2, REG_BINARY=3, REG_EXPAND_SZ=4)
  41.  
  42.  ' Settings for Value # 2
  43.  sV2_Path="HKLM\Software\ATI Technologies\Driver\OpenGL\OGLDisableDitherWhenAlphaBlending" 
  44.  sV2_OnValue="0"      
  45.  sV2_OffValue="1"      
  46.  sV2_DataType="2"     
  47.  
  48.  ' Settings for Value # 3
  49.  sV3_Path="HKEY_LOCAL_MACHINE\Software\ATI Technologies\Driver\OpenGL\Private\enableMultiTexture" 
  50.  sV3_OnValue="1"      
  51.  sV3_OffValue="0"      
  52.  sV3_DataType="2"     
  53.  
  54.  ' Settings for Value # 4
  55.  sV4_Path="HKEY_LOCAL_MACHINE\Software\ATI Technologies\Desktop\OpenGL" 
  56.  sV4_OnValue="1"      
  57.  sV4_OffValue="0"      
  58.  sV4_DataType="2"     
  59.  
  60.  ' Settings for Value # 5
  61.  sV5_Path="HKCU\Software\Hypernix\Gooey\Network\AllwaysOntop" 
  62.  sV5_OnValue="1"      
  63.  sV5_OffValue="0"      
  64.  sV5_DataType="2"     
  65.  
  66. '*** Xteq Systems "On/Off" Plug-in Template ***
  67. '
  68. '-- STOP CHANGES HERE !!
  69.  
  70.  
  71.  
  72. Sub Plugin_Initialize 
  73.  If Len(sCheckPath)>0 then
  74.     if left(sCheckPath,1)<>"\" then sCheckPath=sCheckPath & "\"
  75.  
  76.     b=RegPathExists(sCheckPath)
  77.     if b=true then
  78.        Call ReadSettings
  79.     else
  80.        Call Disable
  81.     end if  
  82.  else
  83.     Call ReadSettings
  84.  end if
  85. End Sub
  86.  
  87. Sub ReadSettings
  88.                            Call ReadSettingsEx(1,sV1_Path,sV1_OnValue)
  89.   if CountSettings>=2 then Call ReadSettingsEx(2,sV2_Path,sV2_OnValue)
  90.   if CountSettings>=3 then Call ReadSettingsEx(3,sV3_Path,sV3_OnValue)
  91.   if CountSettings>=4 then Call ReadSettingsEx(4,sV4_Path,sV4_OnValue)
  92.   if CountSettings>=5 then Call ReadSettingsEx(5,sV5_Path,sV5_OnValue)
  93. End Sub
  94.  
  95. Sub ReadSettingsEx(ID,REGP,VALON)
  96.  s=RegReadValue(REGP)
  97.  'Call DebugMsg("VAL:" & s & " ID:" & ID & " VAL_ON:" & VALON)
  98.  if CStr(s)=VALON then
  99.     Call SetUIElement(ID,true)
  100.  End if 
  101. End Sub
  102.  
  103.  
  104. Sub Plugin_CheckData(ElementIndex)
  105. End Sub
  106.  
  107.  
  108. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  109.                           Call WriteSettings(GetUIElement(1),sV1_Path,sV1_OnValue,sV1_OffValue,sV1_DataType)
  110.  if CountSettings>=2 then Call WriteSettings(GetUIElement(2),sV2_Path,sV2_OnValue,sV2_OffValue,sV2_DataType)
  111.  if CountSettings>=3 then Call WriteSettings(GetUIElement(3),sV3_Path,sV3_OnValue,sV3_OffValue,sV3_DataType)
  112.  if CountSettings>=4 then Call WriteSettings(GetUIElement(4),sV4_Path,sV4_OnValue,sV4_OffValue,sV4_DataType)
  113.  if CountSettings>=5 then Call WriteSettings(GetUIElement(5),sV5_Path,sV5_OnValue,sV5_OffValue,sV5_DataType)
  114.  
  115.  
  116.  if bRequireLogoff then Logoff()
  117.  if bRequireRestart then Restart()
  118. End Sub
  119.  
  120. Sub WriteSettings(CUR_VAL,REGP,ON_VAL,OFF_VAL,DAT_TYPE)
  121.   if CUR_VAL=true then
  122.      Call RegWriteValue(REGP,ON_VAL,DAT_TYPE)
  123.   else
  124.      Call RegWriteValue(REGP,OFF_VAL,DAT_TYPE)
  125.   end if
  126. End Sub
  127.  
  128.  
  129. Sub Plugin_Terminate 
  130. End Sub
  131.  
  132.  
  133.  
  134.